package mz.behaveas.model.spec {

	import mz.behaveas.model.expectation.Expectation;
	/**
	 * @author maxim.zaks@gmail.com
	 */
	public class MallformedSpecification implements Specification {
		private var errorText : String;
		
		public function MallformedSpecification(errorText : String) {
			this.errorText = errorText;
		}
		
		public function addExpectation(exp : Expectation) : void {
		}
		
		public function get description() : String {
			return "The specification is mallformed. ";
		}
		
		public function get report() : String {
			return errorText;
		}
		
		public function get numberOfNotCorrectExpectations() : int {
			return 0;
		}
		
		public function get numberOfExpectations() : int {
			return 0;
		}
		
		public function runExpectations(listener : SpecRunListener) : void {
			listener.specIsMalformed(report);
		}
	}
}
